Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add assembler for post and sheet to replace service convert #1691

Merged
merged 5 commits into from
Mar 3, 2022

Conversation

guqing
Copy link
Member

@guqing guqing commented Mar 1, 2022

What this PR does?

使用 assembler 替代原 service方法中的各种数据组装逻辑,并针对前台主题渲染使用数据与后端数据的差异提供不同的 assembler,例如 PostAssembler针对后台文章数据组装,PostRenderAssembler针对前台主题渲染所需数据的组装

Why we need it?

由于前台和后台使用数据上的差异,公用service方法时数据组装出现分歧,原有方式是在service上加参数或者针对不同的调用场景特殊处理,使用assembler后可以灵活的针对不同的使用场景针对性的组装数据,代码更集中更方便维护。

@guqing guqing requested review from JohnNiang and ruibaby March 1, 2022 09:17
@guqing guqing self-assigned this Mar 1, 2022
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ruibaby ruibaby merged commit 68d263b into halo-dev:master Mar 3, 2022
winar-jin pushed a commit to winar-jin/halo that referenced this pull request Mar 24, 2022
@guqing guqing deleted the feature/post-assembler branch April 15, 2022 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants